simpler fix for #1183