Bugfixes cleanups

Sure, that's great!