fix for missing images
code cleanup