Adjusted condition for invalid number of routines.