Revert "Fix for #1165 and #1200"

This reverts commit e9a4b12e2d1a36e0ce9631c7aacd0c8ae22bc17c.