So what you're saying is that your bs function is broken. And if you look at it, you will quickly see that that is the case -- the base case must always be checked first.