bugfixes here and there