Corrected put implementation for MAP.