many little bugfixes