Changed when_any to simplify