bug fix for popPiece