fixed failing karma tests