fix wrong data saved