Map clone now keeping shallow functions of objects

The object in the map now do not loss their functions.