Recursive function a little bit to recursive

Infinitely recursive
Merge pull request #811 from OscarF/patch-1

Recursive function a little bit to recursive