prevent scrip to fail with query