the first bugfix with a test! :)