Fixed infinite AppFactory Recursion bug.