Revert "Bug fixes"

This reverts commit 6a97ead2deddaef55321bbb76648142a86ff1961.