fixed bug with time count