Fix popup dialog freeze.