fixed downloading bug