fixed a problem that prevented file downloads from working correctly