Fixed job canceling bugs.