added test and fixed break