Fix truncate and expand task-out-of-range mode. fix #127