added more events and fixed IdManager bug