Fixed logic bug in generating ean 13 check digit.