Bugfixes from Master