minors bugfixes