Post all your code.
For what it is worth, the second expression above is always true, unless interval == -100