(stage != x) --> (stage == x)
added missing numInitStages()
code style
numInitStages() fixes