Fix invalid argument passed to dispatch() method