Fixed a bug on remove card procedure