Small bug fixes and a new feature

If/after you accept this pull request, would you make a pull request to VanCoding? It would be nice to have these updates pushed upstream, and even published on the Web Store.