bugfix for add_piece