various bugfix