fixed database connection error