Pull the rotary encoder back and place the hex nut over the top of the shaft. There should be enough clearance to get the nut over the shaft.