fix for failing pdf generation