additional fixes for #1126