Fix regression due to wrong refactor