fix defense bug