fixed bug with dialog boxes not always appearing