Modified img code.