Fixed document downloading