addresses issue #366