fix bug for defence