Fix undefined old variables