fixed issue #65 in branch