fixed bug in image fetch optimization