fixed logic error in test