Make exports.refresh return JSON instead of a string.