Fixed the bug when set mode value is less than the Max mode value.