Part-way through bug fix.