Added condition for models dependency