template specialization not picked by compiler. debugging this issue