fix a bug that we cannot paste if no valid items available