also wait for instance to be running before returning. #344