add warning if $posmax is less than $posmin