modified inflate_xobject and create methods