Added waiting for the page to be completely loaded before starting the survey