Fix NullPointerException in TickHandler