Starter motor not cutting out once engine started?!

Okay so yesterday I took the left hand engine cover off to fix an oil leak. Didnt disconnect any of the wires etc from the cover (magneto etc) and just left it hanging there while I fixed the problem area with some instant gasket (great stuff btw).
Anyway there is one loose gear that slides off the shaft attached to the cover, it can only go on one way so I didnt think anything of it when putting it back together. Anyway I get it all back together sweet and I go to start it...
It starts fine like always, yet the starter motor doesnt seem to cut out once its started. Its like the gear continues to spin and make a real high pitched whirl kind of sound for a second or two before it stops. Now there is no clashing of gears while this is happening so its not like any gears are mis-aligned. And now I find that once the motor is running, I can actually hit the starter button and it whirls away.
Im fairly damn sure it didnt use to work when the motor was running. This makes me think its an electrical problem. Does that sound right? If it was a mechanical stuff up I still shouldnt be able to hit the starter while its already running I would have thought?
How does a starter motor actually work? What normally stops it from spinning once the engine has started? Have I somehow put the loose gear back in wrong?
Ive ridden it to work and back (~100km) and its running better then ever, the only reason I even noticed the problem was because of the whirring sound after it starts.
Anyone got any bright ideas? Its a 98 ZX9R.
Anyway there is one loose gear that slides off the shaft attached to the cover, it can only go on one way so I didnt think anything of it when putting it back together. Anyway I get it all back together sweet and I go to start it...
It starts fine like always, yet the starter motor doesnt seem to cut out once its started. Its like the gear continues to spin and make a real high pitched whirl kind of sound for a second or two before it stops. Now there is no clashing of gears while this is happening so its not like any gears are mis-aligned. And now I find that once the motor is running, I can actually hit the starter button and it whirls away.
Im fairly damn sure it didnt use to work when the motor was running. This makes me think its an electrical problem. Does that sound right? If it was a mechanical stuff up I still shouldnt be able to hit the starter while its already running I would have thought?
How does a starter motor actually work? What normally stops it from spinning once the engine has started? Have I somehow put the loose gear back in wrong?
Ive ridden it to work and back (~100km) and its running better then ever, the only reason I even noticed the problem was because of the whirring sound after it starts.
Anyone got any bright ideas? Its a 98 ZX9R.