Fixes #458. Fixes #459. Fixes #460.