fixed karma errors