Fixing bug in pull request #14