fixing bug with inserting events