Fixed a bug causing db pull to fail when no database exists