Flights back as typhoon hangs off Shanghai