Fix sftp issue found by Nicholas