fixed regression with parsing invalid sql.