bug #47 fixed