fixes #932, and partially also fixes #921