fixed save button behaviour