partitial fix for issue #29