Issue 1248 - Fix delete dialog

Port fix from 2.1 into 2.0.1.
Might need to be skipped during merge.