A few minor bugs corrected