Fixed token_cnt synchronization in ruby driver.