fix undefined indices for actions and listeners