Fixed main read map counting; still needs testing