fix a bug and close issue #2