In December 2004 , Mozambique underwent a delicate transition as Joaquim CHISSANO stepped down after 18 years in office .