Fixes to model loading.