Write data correctly.