Revert "2013-06-03 bugfixes"

This reverts commit dabdb8c89388ba4bb2780deb0c158ed61c9a7267.