Add set and restore format in custom helper