Fix timer crash