adapt to net api change