fixes for sgemm + stencil