Various fixes that disappeared from this branch.