Fixed the database module