Fixed Issue #129 and Issue #131