fixed the problem with popup main dialog