Fix minor bugs.