fixing bug with saving after registration