commiting changes before reset