Revert 106a605..4eab961

This rolls back to commit 106a605794a821b7f21052ce560d268eb749c850.
some fixes