minor bugfixes/improvements