fix warning and add stacktoc