set_data reset format if necessary. Also tests.