Bug fix in color computation