Made the patching thread killable