Fixed address/stack error when disconnecting card. Was dereferencing a null pointer. Now checks for null.