Small refactor to previous commit