Straightening of rectangular frame