Fixed issue with null name space when the model is messed up.