Fixed the broken database connection