Dialog box, bug fixies