Wait for it to scan, then use the arrow keys to rotate it. Turbo mode helps (shift + click the flag).
@Superdoggy helped with bug fixes :)