ZENGINE: Cast completeFrame and frameNumber to int so their difference can go negative
ZENGINE: Fix signed/unsigned mismatch