Fixed the bug of getCurTicks() and getTickDiff().