Fixes issue when removing layer from map

Current map is null, must remember last map and unhook from that