Fix wrong color code and wrong defect removal