Fix crash bugs, image reverse coloring