Fix handling of relative names