Try to prevent recursion calls for issue #17 and issue #34