Bugfixes (partial)