partial fix for #1323