Fix check digit calculation