Bug fix and csr fix.