Fix display of error message when models are loaded from directories