Fix bug when cancelling a job that isn't running.

These weren't being marked as cancelled but they are now.