The Messenger of Allah (ﷺ) used to straighten our rows when we stood up to pray, and when we were straight, he said: Allah is most great (takbir).
Sunan Abi Dawud Book 2, Hadith 275