Fix bugs caused by Map#set(k,v) returning undefined instead of v