buffer stuff, fixes