Fixed the 'submit query' bug.