add timeout before setDirection