Add debug action to remove duplicated save states.
Minor fixes.