fixed recursion base case - thanks, brenwyn