fixing update to db