Improve config var filtering