fix a bug (cancel_job)