Buy new ones, Get a large clamp and twist and hope for the best when you attach them to the railings....or build a box which covers them and floats around the twisted post.
They also sell these box covers to go over the posts for this reason.
Good luck.