various bugfixes
fix