fix spinoff code