minor bug fix to map script