fix bug of board::valid()