Fixes bug when reading EOF on smaps.