Fixed commit issue with unsaved changes