Fix Dialogue class and test it