Bugs corrected