Fixed issue #75, #77
Fixed issue #76