fixed regression from refactor