fix numeric queries over empty string (fix #547)