better buffer termination