File download hang fix

Fixes SOAP-77.