fixes #15

breaking when no variables left, but not returning and ending recursion