various bugfixes
various bugfixes