Fixed vwait

Well, mostly anyway. Still doesnt like vwait with "socket pipe" handles