Fixes #180. Fixes #182. Fixes #183.