printed the wrong variable when a collision is found