Fixed a bug with the new Static_Query code.