Fixed errors with dialog on some pages