fix write_default arg