Sort order bug fixed and doc