Fixed sftp upload bug