how to fix a bad image