Revert "Merge pull request #983 from darkowlzz/bug840314"

This reverts commit 2635e340fc97ee27eb9299ffb8d6b3b34bcf05e1, reversing
changes made to b3e20357526463d2d572a42d4609121a359d62f8.