Nicer fix for stackoverflow issue

Doesn't even add a line of code ;)