revert 278d103 / redo some changes that got lost