corrected mistake in image func.