fix remove card function