Fixed dialog end behavior, grep usage