correct mistakes in list move function and endbuffer function, now all function work correctly.