cleanup of apache state