fixed setDirection typo