[Plugin] Fix wait routine 2