Fixed saving data issue