Fix substring logic in movePiece()