Search the net on setting up the deraillers.
Also make sure the cable is clamped in the derailler clamps groove.
I recently swapped my cable and there was a small bend in the cable by the rear derailler clamp that kept it from shifting through all the gears properly.
Once I put in a new cable and it was clamped perfectly my shifting was back to normal.