fixing ordering of grams and tweets