Be careful about this because moving this to callback means we also need to add callback for deletion from actionmenu, so I'm not sure if it's necessary to change this behavior.