quick fix: query submit twice bug