working on some more bugfixes