fix adding to db