Fixed some ui bugs (dialogs).
Partial solution for #20