Fix crash bug when @all is used in console.