bug fixes & test case updates