Changes do not get saved sometimes