Check the speed sensor on the transmission and the connections to the back of your gauge cluster. If the connections are loose it will give you intermittent speedo operation and will mess up the transmission shifting. Also that sensor in the transmission could be bad or have a chewed up gear.