Fix database connection error