fix bug for save data to db