fix crashes cause by wrong map_size