fixed download handling
cleanup