fix templates for library and buffer: added onKernels()