Fix bug #3774

Fixed bug #3774. I have no idea how that error even managed to make it's way into master. I thought that I removed all dialog related code from that functionality this summer...