Temporary patch for unit test to pass
Minor memory buffer fix