#31 fix for StackOverflow issue