fix bug in KM model and Cox model