avoid name collisions when using more than one mode in callbacks