fixed bug in expansion of multiple logarithms