fixed teach/wait