avoid excessive recursion
bug fixed