Fixing issue with dialog position