Bugfixes for last change