Thousands of flights canceled