fix plan unpacking