fix tick undefined issue