Fix for having a max value smaller then min
Merge pull request #19 from MarwanG/fix

Fix for having a max value smaller then min