Init commit when dispatching
Refine code