improve code for ffndb dialog loading.