Fix buffer directory behavior