Fix the export bug

should return a new rather than a function....