Bugfixes from previous