Added some fixes from review of my pull request.