fixed image bug

added changes to fix an error when using images on some reports.