correct serialize and indentation