Bug 841370 - Fixing a wrong query to avoid interrupting a script execution