Revert "bugfixes"

This reverts commit d6d73dc9133575bcdf16c1709746eb683097d78f.