Partial fix for issue #29