Bug fix for loading inference models