ENH: Added changes to the face detection logic.