Fixed #1275 (Creating assignment pdf failed)