fix if statement syntax error