fixed two bugs in test