Improve order:0/last doc