fixa few bugs