fix downloading bug