Fixed bug in fault segment writing