1995 Honda Accord • 119,000 miles

I have 1995 honda accord ex 2.2l vtech that I recently purchased. When im driving it shifts normal but if I try to accelerate to pass another driver it acts as if the rev limiter is going off at 4, 00 rpm and wont shift but if let foot off gas it shifts it also wont go pass 80 mph with out doing same thing. It has check engine light on I pulled code it blinked 4 times. I went on alldata it said it was code for crank position sensor I went and found sensor in a pic a part sense they dont sell the sensor because its in the distributor I tryed to reset ecm to get out of limp mode after started vehicle it was good then light turned on quickly after start up showing same code if theirs anyone that can help I would be really appreciated I would like to know were I should go from here
March 16, 2013.

Here's a pic

Mar 16, 2013.