fixed logic error that was always returning true