fixed download code when passing a source id