fix the bug on docDBsorter.