small bugs corrected