Tweaks and bugfixes