Fix path-to-entry logic.