bug fixes in retry job, kill job and options rewriting for SGE