reordered refreshTick check to be slightly more effiecient