added some fix to store to db