Fix dimoffice office tp

Fixed a bug and added tests