Changed timeout to ticks