#172 #192 #207 #221 Fixed issues with min=0 or max=0