i feel like something mustve hijacked the variable so i gave it its own new one for the calculation and havent seen the bug since