Added recursion limit for dot generation. Fixes #26