Hi, thanks for reporting this! Fixed this on V1.11 (technicals: the building's upgrades array's length is now properly recognised before array is operated on).