Error handling improvements for waittodisappear