fixed problem of checking events before completed