Fixed Issue #30, #31, #77
Fixed Issue #30, #31, #77