I've just reused code instead of copying. Recursion is already fixed.