partial fix for issue #50