Fixed wrong invert matrix being passed