fix bug at beforeExecution