Change a reference variable to be volatile long

Removed some warnings associated with it, was the wrong variable type.