fixes a long-standing bug about procvar checking