Fixes #605. Fixes #602.