Fix jobs.cancel and add integration test. closes #2258