fix bad initialization of tick_count