corrected minor bugs