Bugfixes, backwards compatibility improvements