fixed state update bug in piece component