Stop TS4 from crashing when stacking objects