fixed a bug issue #49