more bugfixes (due to refactoring)