Revert pull request #16, as it broke functionality