fixed wrong use of double buffer in functions using srts