Fixed the error with test cases.

dialog.vala is still unclean and work under progress.
Unfit for use in current state.