bugfixes
minor cleanup