correct the type in map