there is just really no reason to take it out if you are just pulling the trans and case, there is a connection.
you should just unplug it and leave the switch in the case.
if you unscrwed it with it plugged in you may have broken the wire or something.