remove map when the task is finished.