If the gearbox is good and goes full swing left and right I normally leave the crane on the shaft although leave the grub screw loose so the shaft can still spin inside it. Run the test and when the crane hits each side (far left and far right) it should be then ok to tighten the crane to the shaft.
Then run test again. Just be prepared to turn the machine off just incase it is still out of alignement and it is trying to push further than the switch.