fix two runtime errors in subRequest method