OpenSEMC changes for getting the right code