Fix some thor task issues, and handle integration failures