fix images saving with incorrect paths.