fixed some bugs w/ dialog and buttons