Fixed adding to databases