Fixed calculation of stream template access