fix bug in regression tree