minor bugfix + test