Fix unwanted scope change