bugfixes
more bug fixes