Fix errors in card class