fix getUncommittedEvents being used to also clear the uncomitted events