Fix bugs in equals comparison
Add test case for batched reads