stsm: fixed document downloading