Fix query sent twice on Firefox

Please review.