Closed issue #69 and #49.
Fixed issue #70.