Fixed shared buffer overwriting after obtaining.