fixed bug of range