another part of fixing delegate events