Fixed minor bugs.