minor bugfixes & improvements