applying a patch lukas made to ICF to image helper to fix  resizing bug