Fixed a bug in pdf reader