Fixes issue with pdf writer