Possible fix for TypeError.

TypeError: no implicit conversion of PDF::Reader::Reference into Integer