fixed pagination bug for events