Second try at fixing the database