Fix name and path comparison bug