Cleanups
Bugfix: Undo bugs introduced in a previous commit