corrected a bug, dumping file was dumping fields in the wrong order