added a couple missing semicolons and fixed a typo in the comments