Fixed infinite loop of a method calling itself.