bug #39 fixed