Don't release the buffer when there still is data in it

RT: 2167, 3265