fixed the adding events