Bounce when hitting wall

Hey everyone I’m working on a simple 2d game, but I’ve run into a problem.
Right now if you shoot a projectile and it hits the wall it will bounce perfectly. But if it hits another wall it screws up, which is perfectly makes sense. Why? Because that’s how I coded it. Here is a example picture of the problem:

alt text

I need help to reformulate the code, and here it is:

public class bullet : MonoBehaviour {
	
	public Vector3 velocity;
	public float speed;
	

	void Start () {
		velocity = transform.up;
		speed = 250;
		
		StartCoroutine (Wait (5));
	}
	
	void Update () {
		transform.position += velocity * Time.deltaTime * speed;
	}
	
	IEnumerator Wait(float seconds) {
		yield return new WaitForSeconds(seconds);	
		Destroy(transform.gameObject);
	}
	
	public void OnCollisionEnter(Collision owner) {
		if(owner.gameObject.tag == "wall") {
			
			foreach( ContactPoint contact in owner.contacts ) {
				velocity = Quaternion.AngleAxis(180, contact.normal) * transform.up * -1;	
			}
		}
	}
}

using UnityEngine;
using System.Collections;

public class move: MonoBehaviour {

public Vector3 velocity;
public float speed;
bool flipped = false;

void Start () {
   velocity = transform.up;
   speed = 3;

   StartCoroutine (Wait (5));
}

void Update () {
   transform.position += velocity * Time.deltaTime * speed;
	Debug.DrawRay(transform.position, velocity*10);
}

IEnumerator Wait(float seconds) {
   yield return new WaitForSeconds(seconds); 
   Destroy(transform.gameObject);
}

public void OnCollisionEnter(Collision owner) {
	Debug.Log ("Collision");
   if(owner.gameObject.tag == "wall") {

     foreach( ContactPoint contact in owner.contacts ) {
			Debug.Log ("going");
		if(!flipped){
      velocity = Quaternion.AngleAxis(180, contact.normal) * transform.up*-1;  
		flipped = true;
			}
		else{
		 velocity = Quaternion.AngleAxis(0, contact.normal) * transform.up;
			flipped = false;
			}
     }
   }
}

}

Seems relevant