fix csr incorrect ranges