Fixed unstacking bugs