Fixes

See commits.

Addresses #269.