Moved region to variable to prevent compilation errors?