fixed syntax error on condition