Fixed bug in Dialog and Button

Fixed bug in Dialog and Button