I had kept my betta in a 2.5 gallon tank for about six months before finally getting him a 5. The filter was a bit too strong so I fixed piece of a water bottle to it and that seemed to help for a couple days. He was just fine until i noticed him flaring up. I figured it was the filter so I simply shut it off but he wouldn’t stop. He kept flaring and swimming in a strange diagonal way until I scooped him up in a clear plastic container and set him aside. At first I thought this could be swim bladder but the flaring up seems inconsistent. He did totally fine in the 5 and rarely flared up in the 2.5 unless of course he got upset but it was never like this. Is there something wrong with him? Is it safe to put him back in the tank?