fixes for #1378