Fixed download bugs