Fix duplicate download target problem
Remove casts