Fixed bug in lost else branch in recursive if-else