Changed check to be a global variable

Now correctly determines the total number of checks