Invalid variable fixes