Fixed bug #36.
Fixed bug #38.
Fixed bug #44.