fixes and test case