bugs corrected and stuff