Fix another bunch of bugs.