Fixed threads canceling.