fixing downloading bug