Added 'wait' for modal