improve path setting.