fixed error created during refactoring