bugs corrected