More scope fixes