made some minor bugfixes