Fix: set 'main' action after the query dispatch