Improved management of min/max positions

Ditto