Fixes bugs

- Incorrect min value
- Didn't allow null value