* Fix ditto bug and add unit tests Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>