Fix bounds checking

The bounds check should be done only when the end bound is set.
When the end bound is unset any start bound is valid.
Merge pull request #3 from jroitgrund/master

Fix bounds checking bug