Fix remaining bugs.