Minor change to events handeling