Correct scope checking