fixed error when submitting empty scan query