Splitting Pyramid Problem

Good for now:
Bad. One of the faces reappears down the middle:

I've have a pyramid on screen. I'm able to rotate it by 5 degrees on the y-axis, but at certain points one of the faces will appear straight down the middle, and will continue to increase in size until it reaches the original face size, which at that point if you continue to go in the same direction (using the left/right arrow keys) the pyramid will then rotate in the opposite direction. I am incrementing and decrementing the angle with: