Infinite stack loop in cartridge_type