more scope fixes