support for downloads and some fixes