Improve static support in traits