SFTP: Fix bug whereby sometimes download amount would be ignored