fixed to karma tests (6 still failing)