fixed bug: switching countdirection