Fixed totalTicks with threading