Fixed problem with rhs3 gray-scale

was using min instead of max