Fix bug with unsaved changes checker on submit and validate