Partial fix for issue #4