Revert "bugfixes"

This reverts commit 4d71d00a8d7885b417f038490fe5922f52962094.