fixes issues with database connectivity