Fixing issue #93 and #101