issue with incorrect data saving fixed