fix the 'list pop' bug