Fixed a bug issue #41

Fixed a bug #41