Fix outstanding bugs.