Make identification algorithm more robust