Allow more flexibility when data: function

Check line 825