fixed MPI tests and agent 'CANCEL' functionality