bugfixes s  in pdf generation