Fix karma tests.

Probably were broken by c8aed5a1fd06b4ace45c84b34b38f3e2024f77d0.
Closes #399.