Fixed a bug with events in processes