Indentation little issue
Added safety checks to avoid infinite recursion