Stage one of fixing bugs.