Fixing condition to populate warehouses