Not all boundaries working

as far as I know the collision code I’ve written should be working, but some of the time the character isn’t being stopped from moving past a boundary. In the .fla and .swf the boundarys are the borderless green rectangles, while the 4 bordered rectangles around the character’s feet are his “boundaries”. If someone could help me figure out why its not working I’d really appreciate it. thanks.