fix for invalid image paths