Fixed the number checker.

The loops work correctly now.