fixed sending headers twice i think