more buffer fix stuff
looks like the last of the buffer fix for now.