Fix issues with pull request #184