Fixing empty dispatcher error with before execute hook