fix karma test case