Fixes #43
Fixes #48, #49