Fix double class definition
fix usage of dialog instead of currentDialog