Bugfixes from dev