Fixes to libpaper.3