Local fix for detecting model class