fixes sword attack bug