setbuf call doesn't appear to be working...