got downloading to work, but doesn't close connection