fix: make sure to commit every interval
clarifications
avoid doing the logic if nothing to commit, should speed things up
bugfix: avoid nil pointer exceptions