Fixes, as discussed in bbf3d99939fbe0cb60673c6feedecbdba22c258b