Undoing change to command array