Fixing bug in writing catalogue with CMT data.