various bugfixes
ws