Fixed #39.
Fixed #44.
Fixed #49.
Fixed #50.
Closed #43.