missing semicolons in grammar
handle some additional scenarios