Fixed issue #98 and #97