Gluing wooden blocks between the frames should indeed solve this problem The blocks must be correctly sawn at 90°