fixed offset problem with unpacking