Fix a bug that PDF can't be loaded

Reported by Junichi Oya. Thanks!!!