Fixed error in events retrieving