fix logic for outdated lastEvent