Fixes variable when dealing with nested classes.