Fix the MAP bug