Fixes #606. Fixes #607.