Fixed database connection error