fixing triple-color bug