fix a bug #980