Fix basic bugs.