Mesh rotation doing a complete backwards spin once going past 180 or 0

Here’s the solution.