handles canceled downloads properly (fixes #81)