* Fix stack overflow error

We were running into problems on Android and @JlUgia fixed it with the change on this pull request.