Thousands of flights cancelled