solved issue with setting max values. thanks to Simon Mueller and Patrick Toche