fixed bug with image downloading