fixing database connectivity