fixed rolling checksum algo bug and added a test for it.