minor bugfixes galore