Barrier occur a template problem