Smal bug fix - if record in event table dosen't exist, I create it.