Fixed the DB conversion script