fix to index for unpack