fixing the horrible things I did to the database.