fix failing Karma unit test