Fix documents sort timing