remove registered query vars. Fixes #1491