Fixed mistakes from pull request #46