Bugfixes & improvements