fixes issues with refactor