Fixes for DialogFactory, and Utils