Corrected minor bugs.