fixed small bug in SyntaxError checking code