Fixing  matrix commands.