fixed for task ending before wait page load