fix attack bug