SFTP threading fixes.