Fixing bug, copying matrix data