Tweaks and bugfix