issue #5592: fix bugs of dialog callback