Issue 1248 - Fix delete dialog

Here's a new pull request for this issue.