Updated setup profile dialog to access database