When you shift into 4th, take your time and make sure it's properly engaged. Make sure there is no debris around the shift linkage preventing 4th gear from fully engaging.
Repairing the transmission isn't really cost effective. If it happens a lot just get a used transmission as Darkness stated.
"Driving is like a narcotic, an addiction that can take over lives. It ruins people, breaks families apart, and even kills. Itís habit that needs to be fueled. Time, money, rationality, sweat, knuckle skin, and anyone who disapproves are of little importance to a driver, and are often overlooked. Hi, Iím Nelson, and Iím a drivaholic."