Re-Installing Pool Rail

My pool rail is loose.

I went to tighten the bolts and the bolt heads snapped off just by me touching them.

What do I do now?