improve namespace resolve