When making a U shape dont create straight walls, make it more like a rounded V. The reason the ball goes through your wall sometimes is because since the ball can go UP through walls, once a wall reaches a vertical position it treats any further curving as a ceiling and passes right through.
Good game but often times when you make it to a gap on the far end of the screen, the next gap will end up on the other side, in which case you cannot make it.