Some fixes(?) for map. May break something