fix nested models and modelType

Signed-off-by: Martin Bastien <martin.bastien@studiofrenetic.com>