On you transmission's ZF emergency brake assemble is your Vehicle Speed Sensor (VSS). It sends a signal to the PSOM, located on the dash. The VSS's signal also goes to the ECM, and controls transmission shifting. The PSOM is what drives the speedometer. If your transmission is shifting funny, then the VSS is probably at fault.