Fixed issue #94 and #91