Added check for redundant saves