fixed functions with same names
fixed displaying "unsaved" flag when user switch tabs
fixed displaying "unsaved" flag after app's start