fixing error in scope