Convert event callbacks from map to slice.

This ensures correct ordering when calling back the listeners.