fixed save function (__toc is not saved)