fix error from refactor