Set map in 'add' and 'remove' event handler