fix the bug if list functions return empty result