make sure data is saved properly