fixed bug on missing table name in some models