Flush the jobs on media query statechange as well as teardown