deinit card
improve unit test