Revert "Revert "Fixed permabuffs""

This reverts commit f3f4d4a4c36c69f7e9695d2c59963fd0390fed32.