Added exit(0) to subassembly function