Added MSG_wait