Fixed Issue #77, Issue #131 and Issue #134