Fixes #49. Fixes #2