fixing a bug when munmapping a file