fixing issue #47