When adding multiple queries one after the other, sometimes this caused
an error. It is now fixed.