Models code fix