Fixing Syntax of if tests