Fix schematic loading code