Various fixes related to #101.