More fixes that should actually have been committed before I started testing :-(