fixing database connection issue