fix bug of range