Fix the version check when no database exists