Fixing Karma tests