Fixes #39
Fixes #40