improvements in user input validation in case of query by remote id