Eliminated a potential stack overflow when identifying molecules