Fixed a recursion issue