fixed problem in unpack