tweaked query some more, hides button, slightly more robust