fix a bug, max control not working