hitTest glitch with ball and several walls

I’m making a game where the ball bounces off several walls to get to its destination: the portal. When the ball reaches a high speed it glitches through most of the walls.

Here is my scene for the 3rd level of my game where the most glitches occur (attached file)
In the picture there lists all the variables i put in the objects. You will also notice that I put a “Stuck” button since there were many glitches.

Here is my code:
onClipEvent (load) {
power = 1;
yspeed = 0;
xspeed = 0;
friction = 1;
gravity = 0.5;
thrust = 1.6;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
xspeed -= power;
}
if (Key.isDown(Key.RIGHT)) {
xspeed += power;
}
if (Key.isDown(Key.DOWN)) {
yspeed += power*thrust;
}
xspeed = friction;
yspeed += gravity;
_y += yspeed;
_x += xspeed;
if (_root.wall2.hitTest(_x-(this._width/2), _y, true) or _root.wall2.hitTest(_x+(this._width/2), _y, true)) {
xspeed = -1;
}
if (_root.wall1.hitTest(_x, _y-(this._height/2), true) or _root.wall1.hitTest(_x, _y+(this._height/2), true)) {
yspeed = -1;
}
if (_root.bounce.hitTest(_root.hero)){
_root.hero.yspeed
=-1;
}
if (_root.bounce1.hitTest(_root.hero)){
_root.hero.yspeed
=-1;
}
if (_root.bounce2.hitTest(_root.hero)){
_root.hero.yspeed
=-1;
}

if (_root.portal.hitTest(_x, _y, true)) {
_root.gotoAndStop(4);
}
}