Fix the karma tests

I have honestly no idea what I'm doing here, just fixing the test failure. There might be a way better way to fix it.