Fixed the database script.