fixes #5437 #5438

also fixes #5438