Speeded up a lot the piece checking phase