Fixing bug with karma