Sleep delay in wait_for was only called once, causing tight poll loop on yield calls