Fixed bug on invalidating pieces

* It was invalidating more than one piece, since
it was checking a range not equality