useFragment IF/ELSE logic reversed in listen()