fix unpacking sequence