Bugfixes and tweaks
Bugfixes and tweaks