fixed a bug in series expansion

fixed a bug in series expansion