Not sure if deleting from a map while iterating it is safe.. I'de double check that one.