A few minor fixes, including to databases