Fixes #43
Fixed #50 (duplicate of 43)
Fixes #46