better fix for #1647