Draw("P") option not working correctly

TFile* event_time_per_cluster(int debug = 0)
{
    //gROOT->ProcessLine(".x cbmsim.C");
    TCanvas* c1 = new TCanvas("c1","c1");
    TFile* rec_root = new TFile("ev100_12gev_00001.rec.root", "UPDATE");
    rec_root->cd("MonitorResults;1");
    if (debug) rec_root->pwd();
    if (debug) rec_root->ls();
    TH1F* sts_cluster_exec_time = (TH1F*) gDirectory->Get("hist_0x55ed969e1d50_StsFindClusters_EXEC_TIM;1");
    if (debug) cout << "pointer of sts cluster exec time " << sts_cluster_exec_time << endl;

    //TCanvas* c1 = new TCanvas("c1","c1");

    int size = sts_cluster_exec_time->GetNbinsX();
    if (debug) cout << "number of bins " << size << endl;
    float time_per_event[size];
    for (int i=0; i < size; i++) {
        time_per_event[i] = sts_cluster_exec_time->GetBinContent(i);
        if (debug) cout << sts_cluster_exec_time->GetBinContent(i) << endl;
    }

    cbmsim t;
    int* cluster_per_event = t.Loop();

    TH1F* h1 = new TH1F("h1", "Time per Cluster Event Mode", 2000, 7000, 9000);
    h1->SetXTitle("Number of Clusters");
    h1->SetYTitle("Time");

    for(int i=0; i< size; i++) {
        h1->Fill(cluster_per_event[i], time_per_event[i]);
        if (1) cout << "i = " << i << "    clusters = " << cluster_per_event[i] << "    time = " << time_per_event[i] << endl;
    }
    gDirectory->pwd();
    h1->SetMarkerStyle(20);
    h1->Draw("P");
    //h1->Print();
    c1->Modified();
    c1->Update();
    h1->Write("Time_per_Event_Clusters",TObject::kOverwrite);

    //rec_root->Close();
    return rec_root;
}

So basically I want to draw a histogram without connected lines. When using the Draw(“P”) function, it draws the markers but also draws lines.
Can anyone explain what’s happening?

Ubuntu with Root version 6.10/8

Try: h1->Draw("HIST P");

Still produces the same output for me. Any other ideas?
Edit: Now it seems to work but I can’t open my histo anymore?
Edit 2: Okay, i don’t know what happened but it all worked out after restarting, thanks.
Would you mind explaining why adding HIST did the job? Where did i tell the histo i had error bars??

TH1::Fill

Mhm okay thanks, I now do understand where it comes from, but I don’t quite get why it’s implemented like that.
Is there a better way to fit various values to a float?