buffer fix