errors in wait