Fix RGB median