modal hide fixed

call to modal.loading doesn't create modal, and call to modal.hide fails