Syntax error at if statement