Added support for maxvalue.