Add tests for buffer fix