Custom dispatch hook