little cleanup, bugfixes