Fix random bugs.