Fixed issue in name query