Bug: limit length of query.