Fixed updating when database doesn't already exist.