patch to fix libreoffice bug