(im using an autoclicker, my guess is it somehow lets me buy 2-3 times before it checks for max lvl of an upgrade)
turns out before calculating cost too