added loonywin_get_buffer
use loonywin_get_buffer instead of accessing the buffer directly