Fix ambiguous template specializations