fixed conditionals in script