Fixes #61. Fixes #60 (to some extent).