fix error in conditionals