Correct faulty database schema, models