Fixed a bug introduced by moving dispatcher creation